package com.pattern.factory.absfactory.pizza.order;


import com.pattern.factory.absfactory.pizza.LDCheesePizza;
import com.pattern.factory.absfactory.pizza.LDPepperPizza;
import com.pattern.factory.absfactory.pizza.Pizza;

/**
 * @author 冯志立
 * @create 2019-10-17 15:41
 */
public class LDFactory implements AbsFactory {

    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if (orderType.equals("cheese")){
            pizza = new LDCheesePizza();
        } else if (orderType.equals("pepper")){
            pizza = new LDPepperPizza();
        }
        return pizza;
    }
}
